Platform Explorer / Nuxeo Platform 2021.47

Component org.nuxeo.ecm.core.operation.OperationServiceComponent

Documentation

Requirements

Resolution Order

816
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.

Start Order

826
The start order represents the order in which this component has been started by the Nuxeo Runtime framework.
This number is interesting to tweak if your Java component interacts with other components, and needs to be started before or after another one.
It can be changed by implementing the method "Component#getApplicationStartedOrder()" on your Java component: components are sorted according to this reference value, in increasing order.
The default value is 1000, and the repository initialization uses number 100. Negative values can also be used.

Implementation

Class: org.nuxeo.ecm.automation.core.AutomationComponent

Services

Extension Points

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.ecm.core.operation.OperationServiceComponent"
  version="1.0">
  <!-- TODO: cannot rename this component since studio is using the old name - fix this
    <component name="org.nuxeo.ecm.automation.core.AutomationComponent" version="1.0">
  -->

  <documentation>@author Bogdan Stefanescu (bs@nuxeo.com)</documentation>

  <implementation class="org.nuxeo.ecm.automation.core.AutomationComponent" />

  <require>org.nuxeo.runtime.management.ServerLocator</require>

  <service>
    <provide interface="org.nuxeo.ecm.automation.AutomationService" />
    <provide interface="org.nuxeo.ecm.automation.AutomationAdmin" />
    <provide
            interface="org.nuxeo.ecm.automation.core.events.EventHandlerRegistry" />
    <provide interface="org.nuxeo.ecm.automation.core.trace.TracerFactory" />
    <provide interface="org.nuxeo.ecm.automation.context.ContextService" />
  </service>

  <extension-point name="operations">
    <documentation>Operation registration</documentation>
    <object class="org.nuxeo.ecm.automation.core.OperationContribution" />
  </extension-point>

  <extension-point name="adapters">
    <documentation>Type adapter registration</documentation>
    <object class="org.nuxeo.ecm.automation.core.TypeAdapterContribution" />
  </extension-point>

  <extension-point name="chains">
    <documentation>Operation Chain registration</documentation>
    <object class="org.nuxeo.ecm.automation.core.OperationChainContribution" />
  </extension-point>

  <extension-point name="chainException">
    <documentation>
      @since 5.7.3
      @author Vladimir Pasquier (vpasquier@nuxeo.com)

      Chain Exception registration.
      Chain exception provides mean, during an Automation execution, to catch for a given chain, exception and to run
      specific chain/operation. Filter condition (filterException extension point), order (priority) and rollback
      options are available.

      Example of chain exception:

      <code>
        <catchChain id="catchChainA" onChainId="contributedchain">
          <run chainId="chainException" priority="0" rollBack="false" filterId="filterA"/>
          <run chainId="chainException" priority="0" rollBack="false" filterId="filterA"/>
          <run chainId="chainException" priority="10" rollBack="true" filterId="filterB"/>
        </catchChain>
      </code>
    </documentation>
    <object class="org.nuxeo.ecm.automation.core.ChainExceptionDescriptor"/>
  </extension-point>

  <extension-point name="automationFilter">
    <documentation>
      @since 5.7.3
      @author Vladimir Pasquier (vpasquier@nuxeo.com)

      Automation Filter registration. See one usage of the filter into Chain Exception extension point: chainException.

      Example of Automation filter:

      <code>
        <filter id="filterA">expr:@{Document['dc:title']=='file'}</filter>
        <filter id="filterB">expr:@{Document['dc:title']=='document'}</filter>
      </code>
    </documentation>
    <object class="org.nuxeo.ecm.automation.core.AutomationFilterDescriptor"/>
  </extension-point>

  <extension-point name="event-handlers">
    <documentation>Core Event Handlers bound to operations</documentation>
    <object class="org.nuxeo.ecm.automation.core.events.EventHandler" />
  </extension-point>

  <extension-point name="contextHelpers">
    <documentation>
      @since 7.3
      @author Vladimir Pasquier (vpasquier@nuxeo.com)
      Context helper functions contribution.
      Example:
      <code>
        <contextHelper id="platformFunctions" class="org.nuxeo.ecm.automation.features.PlatformFunctions"/>
      </code>
    </documentation>
    <object class="org.nuxeo.ecm.automation.context.ContextHelperDescriptor"/>
  </extension-point>

  <extension target="org.nuxeo.ecm.core.operation.OperationServiceComponent"
    point="adapters">
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.StringToDocRef"
      accept="java.lang.String" produce="org.nuxeo.ecm.core.api.DocumentRef" />
    <adapter
      class="org.nuxeo.ecm.automation.core.impl.adapters.StringToDocModel"
      accept="java.lang.String" produce="org.nuxeo.ecm.core.api.DocumentModel" />
    <adapter
      class="org.nuxeo.ecm.automation.core.impl.adapters.DocModelToDocRef"
      accept="org.nuxeo.ecm.core.api.DocumentModel"
      produce="org.nuxeo.ecm.core.api.DocumentRef" />
    <adapter
      class="org.nuxeo.ecm.automation.core.impl.adapters.DocRefToDocModel"
      accept="org.nuxeo.ecm.core.api.DocumentRef"
      produce="org.nuxeo.ecm.core.api.DocumentModel" />
    <adapter
      class="org.nuxeo.ecm.automation.core.impl.adapters.DocModelListToDocRefList"
      accept="org.nuxeo.ecm.core.api.DocumentModelList"
      produce="org.nuxeo.ecm.core.api.DocumentRefList" />
    <adapter
      class="org.nuxeo.ecm.automation.core.impl.adapters.DocModelToDocRefList"
      accept="org.nuxeo.ecm.core.api.DocumentModel"
      produce="org.nuxeo.ecm.core.api.DocumentRefList" />
    <adapter
      class="org.nuxeo.ecm.automation.core.impl.adapters.DocModelToDocModelList"
      accept="org.nuxeo.ecm.core.api.DocumentModel"
      produce="org.nuxeo.ecm.core.api.DocumentModelList" />
    <adapter
      class="org.nuxeo.ecm.automation.core.impl.adapters.DocRefListToDocModelList"
      accept="org.nuxeo.ecm.core.api.DocumentRefList"
      produce="org.nuxeo.ecm.core.api.DocumentModelList" />
    <adapter
      class="org.nuxeo.ecm.automation.core.impl.adapters.DocRefToDocModelList"
      accept="org.nuxeo.ecm.core.api.DocumentRef"
      produce="org.nuxeo.ecm.core.api.DocumentModelList" />
    <adapter
      class="org.nuxeo.ecm.automation.core.impl.adapters.DocRefToDocRefList"
      accept="org.nuxeo.ecm.core.api.DocumentRef"
      produce="org.nuxeo.ecm.core.api.DocumentRefList" />
    <adapter
      class="org.nuxeo.ecm.automation.core.impl.adapters.StringToProperties"
      accept="java.lang.String"
      produce="org.nuxeo.ecm.automation.core.util.Properties" />
    <adapter
      class="org.nuxeo.ecm.automation.core.impl.adapters.JsonNodeToProperties"
      accept="com.fasterxml.jackson.databind.JsonNode"
      produce="org.nuxeo.ecm.automation.core.util.Properties" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.StringToURL"
      accept="java.lang.String" produce="java.net.URL" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.StringToDate"
      accept="java.lang.String" produce="java.util.Date" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.StringToCalendar"
      accept="java.lang.String" produce="java.util.Calendar" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.CalendarToDate"
      accept="java.util.Calendar" produce="java.util.Date" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.StringToList"
      accept="java.lang.String"
      produce="org.nuxeo.ecm.automation.core.util.StringList" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.StringToBoolean"
      accept="java.lang.String"
      produce="java.lang.Boolean" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.StringToInteger"
      accept="java.lang.String"
      produce="java.lang.Integer" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.StringToLong"
      accept="java.lang.String"
      produce="java.lang.Long" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.IntegerToLong"
      accept="java.lang.Integer"
      produce="java.lang.Long" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.LongToInteger"
      accept="java.lang.Long"
      produce="java.lang.Integer" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.ArrayStringToList"
      accept="[Ljava.lang.String;"
      produce="org.nuxeo.ecm.automation.core.util.StringList" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.CollectionToStringList"
             accept="java.util.Collection"
             produce="org.nuxeo.ecm.automation.core.util.StringList" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.ObjectNodeToMap"
      accept="com.fasterxml.jackson.databind.node.ObjectNode"
      produce="java.util.Map" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.ArrayNodeToList"
      accept="com.fasterxml.jackson.databind.node.ArrayNode"
      produce="java.util.List" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.ArrayStringToDocModelList"
             accept="[Ljava.lang.String;"
             produce="org.nuxeo.ecm.core.api.DocumentModelList" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.StringToDocModelList"
             accept="java.lang.String"
             produce="org.nuxeo.ecm.core.api.DocumentModelList" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.CollectionToDocModelList"
             accept="java.util.Collection"
             produce="org.nuxeo.ecm.core.api.DocumentModelList" />
    <adapter class="org.nuxeo.ecm.automation.core.impl.adapters.CollectionToBlobList"
             accept="java.util.Collection"
             produce="org.nuxeo.ecm.automation.core.util.BlobList" />
  </extension>


  <extension target="org.nuxeo.ecm.core.event.EventServiceComponent"
    point="listener">

    <listener name="opchainlistener" async="false" postCommit="false"
      class="org.nuxeo.ecm.automation.core.events.OperationEventListener"
      priority="200">
    </listener>

    <listener name="opchainpclistener" async="true" postCommit="true"
      class="org.nuxeo.ecm.automation.core.events.PostCommitOperationEventListener"
      priority="200">
    </listener>

  </extension>

</component>